package es.cazadoresmadridejos.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import es.cazadoresmadridejos.model.BaseEntity;

public class BaseEntityUtils {
	
	public static Map<Long,? extends BaseEntity> listToMap(List<? extends BaseEntity> entities){
		Map<Long,BaseEntity> result = new HashMap<Long,BaseEntity>();
		for (BaseEntity baseEntity : entities) {
			result.put(baseEntity.getId(), baseEntity);
		}
		
		return result;
	}
}
